﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmListCategoria.aspx.cs" Inherits="WEB.frmListCategoria" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
        <div class="col-md-12">
        <div class="panel panel-primary">
        <div class="panel-heading">
            <div class="row">
                     <div class="row col-sm-12">
                        <div class="col-md-9">
                          <label style="color:black">
                            <h3>Listado de Categorías</h3>
                          </label> 
                        </div>
                <div class="col-md-2">
                    <a href="frmCategoria.aspx?acc=new" class="btn btn-default" style=" text-decoration:none; margin: auto; color: #ffffff;">Nueva Categoría</a>
                </div>
            </div>
        </div>
        <div class="panel-body">
            
          <nav class="navbar navbar-default">
                    <div class="container">
                        <div class="form-group">
                            <div class="row col-lg-12">
                                <div class="col-md-10">

                                    <label>Criterio</label>
                                    <asp:TextBox CssClass="form-control input-sm" ID="txtCriterio" placeholder="Ingrese criterio de búsqueda" runat="server" />
                              
                                </div>
                                <div class="col-md-2">
                                    <br />
                                    <asp:Button ID="btnBuscar" Text="Buscar" CssClass="btn btn-success" runat="server"  OnClick="btnBuscar_Click" />
                                </div>

                            </div>
                        </div>
                    </div>
                    <!-- /.container -->
            </nav>

        <div class="span12">
        <asp:GridView ID="gvCategoria" CssClass="table table-bordered table-striped table-hover table-condensed" runat="server" AutoGenerateColumns="False" DataSourceID="odsCategoria">
            <Columns>
                <asp:BoundField DataField="Id" HeaderText="COD" SortExpression="Id" />
                <asp:BoundField DataField="NombreCategoria" HeaderText="CATEGORIA" SortExpression="NombreCategoria" />
                <asp:BoundField DataField="Descripcion" HeaderText="DESCRIPCION" SortExpression="Descripcion" />
            </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="odsCategoria" runat="server" OnObjectCreating="odsCategoria_ObjectCreating" SelectMethod="GetFromCategoriasByCriterio" TypeName="Box.BL.CategoriaBL">
            <SelectParameters>
                <asp:ControlParameter ControlID="txtCriterio" Name="criterio" PropertyName="Text" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>

        </div>
   

    </div> 
    </div>

        </div>
   

    
</asp:Content>
